/**
 * Copyright 2019 Inc.
 **/
package com.myz.feign;

import feign.Feign;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;

/**
 * @author maoyz0621 on 19-12-17
 * @version: v1.0
 */
public class FeignBuilderConfig {

    /**
     * 定义依赖的客户端, 使用自定义的Feign.Builder
     * <p>
     * 如果要使用Hystrix断路器, 使用默认的feign.hystrix.HystrixFeign.Builder
     */
    @Bean
    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
    public Feign.Builder builder() {
        return Feign.builder();
    }

}
